#ifndef CYCLICAL_QUEUE_H
#define CYCLICAL_QUEUE_H

#include <stdbool.h>

#define MAX_INFO_LENGTH     21
#define MAX_QUEUE_LENGTH    10

typedef struct {
    int id;
    char info[MAX_INFO_LENGTH];
} UserInfo_t;

typedef struct {
    UserInfo_t data[MAX_QUEUE_LENGTH];
    int front;
    int rear;
} CycQueue_t;

typedef enum {
    CYC_QUEUE_SUCCESS,
    CYC_QUEUE_FAIL,
}CycQueueStatus_t;

void CycQueueInit(CycQueue_t *queue);
bool CycQueueIsEmpty(const CycQueue_t *queue);
bool CycQueueIsFull(const CycQueue_t *queue);
CycQueueStatus_t CycQueueIn(CycQueue_t *queue, const UserInfo_t *data);
CycQueueStatus_t CycQueueOut(CycQueue_t *queue, UserInfo_t *data);
CycQueueStatus_t CycQueueGetFront(const CycQueue_t *queue, UserInfo_t *data);

#endif
